package com.hjn.springboot.web;

import com.hjn.springboot.model.Student;
import com.hjn.springboot.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author: huaijn
 * @create: 2022/3/27 21:17
 * @description: todo
 **/
@Controller
public class StudentController {

    @Autowired
    StudentService studentService;

    @RequestMapping("/queryStudentById")
    @ResponseBody
    public Student queryStudentById(Integer id){
        Student student = studentService.queryStudentById(id);
        return student;
    }



}
